package com.gvtv.main.execute;

import com.gvtv.main.schedul.SchedulEnv;
import com.gvtv.main.schedul.SchedulInfo;

public abstract class AbstractJobWorker implements JobWorker{

	protected SchedulInfo schedulInfo;
	protected ExecuteJob job;
	protected SchedulEnv env;
	
	public AbstractJobWorker(SchedulInfo schedulInfo, ExecuteJob executeJob, SchedulEnv env){
		this.schedulInfo = schedulInfo;
		this.job = executeJob;
		this.env = env;
	}
	
	@Override
	public ExecuteJob call(){
		work();
		clear();
		return job;
	}

	protected void clear() {
		
	}
	public ExecuteJob getJob() {
		return job;
	}

	public void setJob(ExecuteJob job) {
		this.job = job;
	}

	public SchedulEnv getEnv() {
		return env;
	}

	public void setEnv(SchedulEnv env) {
		this.env = env;
	}
	
}
